namespace ext
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>
	/// An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it
	/// can be usefully shared among multiple components. Actions let you share handlers, configuration options and UI
	/// updates across any components that support the Action interface (primarily {@link Ext.Toolbar}, {@link Ext.Button}
	/// and {@link Ext.menu.Menu} components).  Aside from supporting the config object interface, any component that needs to use Actions must also support
	/// the following method list, as these will be called as needed by the Action class: setText(string), setIconCls(string),
	/// setDisabled(boolean), setVisible(boolean) and setHandler(function). 
	/// Example usage:
	/// </summary>
	/// <htmlSummary>
	/// &lt;p&gt;An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it
	/// can be usefully shared among multiple components. Actions let you share handlers, configuration options and UI
	/// updates across any components that support the Action interface (primarily {@link Ext.Toolbar}, {@link Ext.Button}
	/// and {@link Ext.menu.Menu} components).&lt;/p&gt;
	/// &lt;p&gt;Aside from supporting the config object interface, any component that needs to use Actions must also support
	/// the following method list, as these will be called as needed by the Action class: setText(string), setIconCls(string),
	/// setDisabled(boolean), setVisible(boolean) and setHandler(function).&lt;/p&gt;
	/// Example usage:&lt;br&gt;
	/// &lt;pre&gt;&lt;code&gt;
	/// // Define the shared action. Each component below will have the same
	/// // display text and icon, and will display the same message on click.
	/// var action = new Ext.Action({
	/// {@link #text}: &apos;Do something&apos;,
	/// {@link #handler}: function(){
	/// Ext.Msg.alert(&apos;Click&apos;, &apos;You did something.&apos;);
	/// },
	/// {@link #iconCls}: &apos;do-something&apos;,
	/// {@link #itemId}: &apos;myAction&apos;
	/// });
	///
	/// var panel = new Ext.Panel({
	/// title: &apos;Actions&apos;,
	/// width: 500,
	/// height: 300,
	/// tbar: [
	/// // Add the action directly to a toolbar as a menu button
	/// action,
	/// {
	/// text: &apos;Action Menu&apos;,
	/// // Add the action to a menu as a text item
	/// menu: [action]
	/// }
	/// ],
	/// items: [
	/// // Add the action to the panel body as a standard button
	/// new Ext.Button(action)
	/// ],
	/// renderTo: Ext.getBody()
	/// });
	///
	/// // Change the text for all components using the action
	/// action.setText(&apos;Something else&apos;);
	///
	/// // Reference an action through a container using the itemId
	/// var btn = panel.getComponent(&apos;myAction&apos;);
	/// var aRef = btn.baseAction;
	/// aRef.setText(&apos;New text&apos;);
	/// &lt;/code&gt;&lt;/pre&gt;
	/// </htmlSummary>
	/// <definedin>src\widgets\Action.js</definedin>
	[ScriptName("Action")]
	[ScriptNamespace("Ext")]
	[Imported()]
	public partial class Action
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		/// <param name="config">The configuration options</param>
		public Action(ext.Action_Configuration config)
		{
		}
		
		/// <summary>Constructor</summary>
		public Action()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>The text to set for all components using this action (defaults to &apos;&apos;).</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("text")]
		public string Text;
		
		/// <summary>
		/// The CSS class selector that specifies a background image to be used as the header icon for
		/// all components using this action (defaults to &apos;&apos;).
		/// An example of specifying a custom icon class would be something like:
		///  
		/// // specify the property in the config for the class:
		/// ...
		/// iconCls: &apos;do-something&apos;
		///
		/// // css class that specifies background image to be used as the icon image:
		/// .do-something { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
		/// </summary>
		/// <htmlSummary>
		/// The CSS class selector that specifies a background image to be used as the header icon for
		/// all components using this action (defaults to &apos;&apos;).
		/// &lt;p&gt;An example of specifying a custom icon class would be something like:
		/// &lt;/p&gt;&lt;pre&gt;&lt;code&gt;
		/// // specify the property in the config for the class:
		/// ...
		/// iconCls: &apos;do-something&apos;
		///
		/// // css class that specifies background image to be used as the icon image:
		/// .do-something { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("iconCls")]
		public string IconCls;
		
		/// <summary>True to disable all components using this action, false to enable them (defaults to false).</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("disabled")]
		public bool Disabled;
		
		/// <summary>True to hide all components using this action, false to show them (defaults to false).</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("hidden")]
		public bool Hidden;
		
		/// <summary>
		/// The function that will be invoked by each component tied to this action
		/// when the component&apos;s primary event is triggered (defaults to undefined).
		/// </summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("handler")]
		public System.Delegate Handler;
		
		/// <summary>See {@link Ext.Component}.{@link Ext.Component#itemId itemId}.</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("itemId")]
		public string ItemId;
		
		/// <summary>
		/// The scope (this reference) in which the
		/// {@link #handler} is executed. Defaults to this Button.
		/// </summary>
		/// <htmlSummary>
		/// The scope (&lt;tt&gt;&lt;b&gt;this&lt;/b&gt;&lt;/tt&gt; reference) in which the
		/// &lt;code&gt;{@link #handler}&lt;/code&gt; is executed. Defaults to this Button.
		/// </htmlSummary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("scope")]
		public object Scope;
		#endregion
		
		#region Methods
		/// <summary>Sets the text to be displayed by all components using this action.</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		/// <param name="text">The text to display</param>
		[ScriptName("setText")]
		public void SetText(string text)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Gets the text currently displayed by all components using this action.</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("getText")]
		public void GetText()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Sets the icon CSS class for all components using this action. The class should supply
		/// a background image that will be used as the icon image.
		/// </summary>
		/// <definedin>src\widgets\Action.js</definedin>
		/// <param name="cls">The CSS class supplying the icon image</param>
		[ScriptName("setIconClass")]
		public void SetIconClass(string cls)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Gets the icon CSS class currently used by all components using this action.</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("getIconClass")]
		public void GetIconClass()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Sets the disabled state of all components using this action. Shortcut method
		/// for {@link #enable} and {@link #disable}.
		/// </summary>
		/// <definedin>src\widgets\Action.js</definedin>
		/// <param name="disabled">True to disable the component, false to enable it</param>
		[ScriptName("setDisabled")]
		public void SetDisabled(bool disabled)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Enables all components using this action.</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("enable")]
		public void Enable()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Disables all components using this action.</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("disable")]
		public void Disable()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns true if the components using this action are currently disabled, else returns false.</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("isDisabled")]
		public void IsDisabled()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Sets the hidden state of all components using this action. Shortcut method
		/// for {@link #hide} and {@link #show}.
		/// </summary>
		/// <htmlSummary>
		/// Sets the hidden state of all components using this action. Shortcut method
		/// for &lt;code&gt;{@link #hide}&lt;/code&gt; and &lt;code&gt;{@link #show}&lt;/code&gt;.
		/// </htmlSummary>
		/// <definedin>src\widgets\Action.js</definedin>
		/// <param name="hidden">True to hide the component, false to show it</param>
		[ScriptName("setHidden")]
		public void SetHidden(bool hidden)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Shows all components using this action.</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("show")]
		public void Show()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Hides all components using this action.</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("hide")]
		public void Hide()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns true if the components using this action are currently hidden, else returns false.</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("isHidden")]
		public void IsHidden()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Sets the function that will be called by each Component using this action when its primary event is triggered.</summary>
		/// <definedin>src\widgets\Action.js</definedin>
		/// <param name="fn">
		/// The function that will be invoked by the action&apos;s components. The function
		/// will be called with no arguments.
		/// </param>
		/// <param name="scope">The scope (<c>this</c> reference) in which the function is executed. Defaults to the Component firing the event.</param>
		[ScriptName("setHandler")]
		public void SetHandler(System.Delegate fn, object scope)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Executes the specified function once for each Component currently tied to this action. The function passed
		/// in should accept a single argument that will be an object that supports the basic Action config/method interface.
		/// </summary>
		/// <definedin>src\widgets\Action.js</definedin>
		/// <param name="fn">The function to execute for each component</param>
		/// <param name="scope">The scope (<c>this</c> reference) in which the function is executed. Defaults to the Component.</param>
		[ScriptName("each")]
		public void Each(System.Delegate fn, object scope)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Executes this action manually using the handler function specified in the original config object
		/// or the handler function set with {@link #setHandler}. Any arguments passed to this
		/// function will be passed on to the handler function.
		/// </summary>
		/// <htmlSummary>
		/// Executes this action manually using the handler function specified in the original config object
		/// or the handler function set with &lt;code&gt;{@link #setHandler}&lt;/code&gt;. Any arguments passed to this
		/// function will be passed on to the handler function.
		/// </htmlSummary>
		/// <definedin>src\widgets\Action.js</definedin>
		/// <param name="args">Variable number of arguments passed to the handler function</param>
		[ScriptName("execute")]
		public void Execute(params object[] args)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Executes this action manually using the handler function specified in the original config object
		/// or the handler function set with {@link #setHandler}. Any arguments passed to this
		/// function will be passed on to the handler function.
		/// </summary>
		/// <htmlSummary>
		/// Executes this action manually using the handler function specified in the original config object
		/// or the handler function set with &lt;code&gt;{@link #setHandler}&lt;/code&gt;. Any arguments passed to this
		/// function will be passed on to the handler function.
		/// </htmlSummary>
		/// <definedin>src\widgets\Action.js</definedin>
		[ScriptName("execute")]
		public void Execute()
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
	}
}
